package com.his.system.manager.service.impl;

import com.his.system.manager.entity.DepartmentEntity;
import com.his.system.manager.mapper.DepartmentMapper;
import com.his.system.manager.service.IDepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * IDepartmentService实现类
 *
 * @Description
 * @Author Admin
 * @Date 2020-07-17 21:18:50
 */
@Service
public class DepartmentServiceImpl implements IDepartmentService {
    @Autowired
    private DepartmentMapper mapper;

    @Override
    public Integer addEntity(DepartmentEntity entity) {
        Integer res = mapper.insert(entity);
        return res;
    }

    @Override
    public List<DepartmentEntity> selectByEntity(DepartmentEntity entity) {
        return mapper.selectByEntity(entity);
    }

    @Override
    public List<DepartmentEntity> selectAll() {
        return mapper.selectAll();
    }
}